import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

/// 主题
class AppStyle {
  AppStyle._internal();
  static double margin = 15.w;
  static double padding = 10.w;
  static double miniMargin = 5.w;

  static double circular = 8.w;

  //主色调
  static const Color primaryColor = CupertinoDynamicColor.withBrightness(
    color: Color(0xff8446e4),
    darkColor: Color(0xff8446e4),
  );

  //第二主色调
  static const Color secondPrimaryColor = CupertinoDynamicColor.withBrightness(
    color: Color(0xff993cf6),
    darkColor: Color(0xff993cf6),
  );

  //播放器进度条颜色
  static const Color bufferedColor = CupertinoDynamicColor.withBrightness(
    color: Color(0x808446e4),
    darkColor: Color(0x808446e4),
  );

  //scaffold背景颜色
  static const Color scaffoldBackgroundColor =
      CupertinoDynamicColor.withBrightness(
    color: Color(0xFFF8F8F8),
    darkColor: Colors.black,
  );

  static const Color navTitleTextColor = CupertinoDynamicColor.withBrightness(
    color: Colors.black,
    darkColor: Color(0xFFF8F8F8),
  );

  //导航背景颜色
  static const Color appBarThemeBackgroundColor =
      CupertinoDynamicColor.withBrightness(
    color: Colors.white,
    darkColor: Colors.black,
  );

  //边框颜色
  static const Color borderColor = CupertinoDynamicColor.withBrightness(
    color: Color(0xFFEFEFEF),
    darkColor: Color(0xFFEFEFEF),
  );

  static const Color editHint = CupertinoDynamicColor.withBrightness(
    color: Color(0xffA7ADAC),
    darkColor: Color(0xffA7ADAC),
  );

  static const Color gray888 = CupertinoDynamicColor.withBrightness(
    color: Color(0xFF888888),
    darkColor: Color(0xFF888888),
  );

  static const Color gray666 = CupertinoDynamicColor.withBrightness(
    color: Color(0xFF666666),
    darkColor: Color(0xFF666666),
  );

  static const Color gradientStart = CupertinoDynamicColor.withBrightness(
    color: Color(0xff8e42ed),
    darkColor: Color(0xff8e42ed),
  );

  static const Color gradientEnd = CupertinoDynamicColor.withBrightness(
    color: Color(0xff8f08cb),
    darkColor: Color(0xff8f08cb),
  );

  static const Color videoBg = CupertinoDynamicColor.withBrightness(
    color: Colors.black,
    darkColor: Colors.black,
  );

  static const Color inputBgColor = CupertinoDynamicColor.withBrightness(
    color: Color(0xffECEDF1),
    darkColor: Colors.black12,
  );

  static const Color messageTips = CupertinoDynamicColor.withBrightness(
    color: Color(0xFFFF0000),
    darkColor: Color(0xFFFF0000),
  );

  static const Color ddd = CupertinoDynamicColor.withBrightness(
    color: Color(0xFFDDDDDD),
    darkColor: Color(0xFFDDDDDD),
  );

  static const Color eee = CupertinoDynamicColor.withBrightness(
    color: Color(0xFFEEEEEE),
    darkColor: Color(0xFFEEEEEE),
  );

  static const Color color9D9D9D = CupertinoDynamicColor.withBrightness(
    color: Color(0xFF9D9D9D),
    darkColor: Color(0xFF9D9D9D),
  );

  static const Color color777 = CupertinoDynamicColor.withBrightness(
    color: Color(0xFF777777),
    darkColor: Color(0xFF777777),
  );

  static const Color colorE0E0E0 = CupertinoDynamicColor.withBrightness(
    color: Color(0xFFE0E0E0),
    darkColor: Color(0xFFE0E0E0),
  );

  static const Color colorF0F0F0 = CupertinoDynamicColor.withBrightness(
    color: Color(0xFFF0F0F0),
    darkColor: Color(0xFFF0F0F0),
  );

  static const Color color8A8A8A = CupertinoDynamicColor.withBrightness(
    color: Color(0xFF8A8A8A),
    darkColor: Color(0xFF8A8A8A),
  );

  static const Color color1F668EB5 = CupertinoDynamicColor.withBrightness(
    color: Color(0x1F668EB5),
    darkColor: Color(0x1F668EB5),
  );

  static const Color color668EB5 = CupertinoDynamicColor.withBrightness(
    color: Color(0xFF668EB5),
    darkColor: Color(0xFF668EB5),
  );

  static const Color color999 = CupertinoDynamicColor.withBrightness(
    color: Color(0xFF999999),
    darkColor: Color(0xFF999999),
  );

  static const Color color707070 = CupertinoDynamicColor.withBrightness(
    color: Color(0xFF707070),
    darkColor: Color(0xFF707070),
  );

  static const Color colorCCC = CupertinoDynamicColor.withBrightness(
    color: Color(0xFFCCCCCC),
    darkColor: Color(0xFFCCCCCC),
  );

  static const Color rank1 = Color(0xffFF0000);
  static const Color rank2 = Color(0xffFF8900);
  static const Color rank3 = Color(0xffFFD800);
  static const Color rankDefault = Color(0xff777777);

  static const Color colorF7BD56 = CupertinoDynamicColor.withBrightness(
    color: Color(0xFFF7BD56),
    darkColor: Color(0xFFF7BD56),
  );

  static Border appCupertinoNavigationBarBorder = const Border(
    bottom: BorderSide(
      color: CupertinoDynamicColor.withBrightness(
        color: CupertinoColors.white,
        darkColor: CupertinoColors.black,
      ),
      width: 0.0, //
      style: BorderStyle.none, // 0.0 means one physical pixel
    ),
  );

  static TextStyle fontWhite = TextStyle(
    fontSize: 20.sp,
    color: Colors.white,
  );

  static TextStyle fontBlack = TextStyle(
    fontSize: 20.sp,
    // inherit: false,
    color: const CupertinoDynamicColor.withBrightness(
      color: Color(0xFF333333),
      darkColor: Colors.white,
    ),

    // color: Theme.of(Get.context!).brightness == Brightness.light
    //     ? Colors.black // 亮色主题的文本颜色
    //     : Colors.white, // 暗色主题的文本颜色
  );

  static TextStyle fontBlack_333 = TextStyle(
    fontSize: 20.sp,
    color: const CupertinoDynamicColor.withBrightness(
      color: Color(0xFF333333),
      darkColor: Colors.white,
    ),
  );

  static TextStyle fontGrey_777 = TextStyle(
    fontSize: 20.sp,
    color: color777,
  );

  static TextStyle fontPrimary = TextStyle(
    fontSize: 20.sp,
    color: primaryColor,
  );

  static TextStyle fontGray_ccc = TextStyle(
    fontSize: 20.sp,
    color: colorCCC,
  );

  static TextStyle fontGray_999 = TextStyle(
    fontSize: 20.sp,
    color: color999,
  );

  static TextStyle fontGray_888 = TextStyle(
    fontSize: 20.sp,
    color: gray888,
  );

  static TextStyle fontGray_777 = TextStyle(
    fontSize: 20.sp,
    color: color707070,
  );

  static TextStyle fontGray_666 = TextStyle(
    fontSize: 20.sp,
    color: gray666,
  );

  static TextStyle fontGray_707070 = TextStyle(
    fontSize: 20.sp,
    color: const Color(0xFF707070),
  );

  static TextStyle fontGray_ADB1B6 = TextStyle(
    fontSize: 20.sp,
    color: const Color(0xFFADB1B6),
  );

  static TextStyle fontGray_AAA = TextStyle(
    fontSize: 20.sp,
    color: const Color(0xFFAAAAAA),
  );
  static TextStyle fontGray_9D9D9D = TextStyle(
    fontSize: 20.sp,
    color: color9D9D9D,
  );

  static TextStyle fontYellow_F7BD56 = TextStyle(
    fontSize: 20.sp,
    color: AppStyle.colorF7BD56,
  );
}
